// $Header: $

using System;
using System.Data;
using System.Collections.Generic;

namespace LogParser.DA
{
    /// <summary>
    /// Summary description for LogParser.DA.ClassListModel.
    /// </summary>
    public class ClassListModel
    {
        #region Private Member Variables

        DA.DataObjects.ClassesDSTableAdapters.ClassesTableAdapter cta = new LogParser.DA.DataObjects.ClassesDSTableAdapters.ClassesTableAdapter();

        #endregion

        #region Constructor
        /// <summary>
        /// Initializes a new instance of the <see cref="ClassListModel"/> class.
        /// </summary>
        public ClassListModel( )
        {
            Initialize();
        }


        public void Initialize( )
        {
            cta = TableAdapters.ClassesTableAdapter();
        }

        #endregion

        #region Public Properties

        #endregion

        #region Private Properties

        #endregion

        #region Public Member Functions


        public List<GameObjects.Class> GetClassList( )
        {
            List<GameObjects.Class> returnList = new List<LogParser.GameObjects.Class>();

            DA.DataObjects.ClassesDS.ClassesDataTable cdt = cta.GetData();

            foreach ( DA.DataObjects.ClassesDS.ClassesRow dr in cdt.Rows )
            {
                GameObjects.Class tempClass = new LogParser.GameObjects.Class();

                tempClass.ID = dr.ClassId;
                tempClass.LongName = dr.ClassLongName;
                tempClass.ShortName = dr.ClassShortName;

                returnList.Add( tempClass );

            }

            return returnList;

        }

        #endregion

        #region Private Member Functions

        #endregion
    }
}

#region VSS Log

/*
 * $Log: $
 */

#endregion VSS Log